package com.emokili.ewa.common.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @author yuepanpan
 */
@Data
public class MemberRegisterVo {
    @NotEmpty(message = "Please enter your First Name")
    @Length(max = 64, message="First Name length is within 64 characters")
    private String firstName;

    @NotEmpty(message = "Please enter your Last Name")
    @Length(max = 64, message="Last Name length is within 64 characters")
    private String lastName;

    @NotEmpty(message = "Please enter a valid email address")
    @Length(max = 64, message="Email length is within 64 characters")
    private String email;

    @NotEmpty(message = "Please select your country")
    @Length(max = 64, message="Country length is within 64 characters")
    private String country;

    @NotEmpty(message = "Please enter a username")
    @Length(min=4,max = 64, message="Username length is within 64 characters")
    @Pattern(regexp = "^[\\\\u4e00-\\\\u9fa5_a-zA-Z0-9-]{1,16}$",message = "Please enter a valid username (Min. 4 characters, a-z A-Z 0-9)")
    private String userName;

    @NotEmpty(message = "Please enter a username")
    @Length(max = 64, message="Password length is within 64 characters")
    @Pattern(regexp = "^([A-Z]|[a-z]|[0-9]|[`~!@#$%^&*()+=|{}':;',\\\\\\\\[\\\\\\\\].<>/?~！@#￥%……&*（）——+|{}【】‘；：”“’。，、？]){6,20}$",message = "Please enter a valid username (Min. 4 characters, a-z A-Z 0-9)")
    private String password;
}
